<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-statistic.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>

<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>





        <div id="content">
            <?php
                if(!in_array("admin",$quanxian)){
                    echo "<span>暂无权限</span>";
                    exit;
                }
            ?>
            <?php $page_title='任务统计';?>
            <?php include ROOT_PATH_.'/controller/common/module/mod-page-title.php'; ?>






            <?php include 'modules/mod-static-search.php'; ?>


<div class="shrinker">这段时间内截止的任务；
                      这段时间，还在进行中的任务（完结时间在此阶段但是未完结的）；截止时间在这个时，但是还在审核的 </div>

<div class="detail-box  layui-form">


    <table class="layui-table">
        <col/>
        <col/>
        <col/>
        <col/>
        <col/>
        <col/>
        <col/>
        <col/>
        <col width="60">
        <thead>
        <tr>
            <th>名称</th>
            <th>任务数(当前截止)</th>
            <th>进行中(时间段内)</th>
            <th>待审核(时间段内)</th>
            <th>待审核(所有)</th>
            <th>超时未完成</th>
            <th>超时已完成</th>
            <th>准时完成数</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <?foreach ($data['employee'] as $key => $value){?>
        <a>

            <td><a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=&select_startday=<?echo $start_date?>&select_endday=<?echo $end_date?>&sys_part=task" >
                    <u><?echo $value['name'];?></u></a>
            </td>

            <td>
                <a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=&select_startday=<?echo $start_date?>&select_endday=<?echo $end_date?>&sys_part=task" >
                <?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and enddate > '$start_date' and enddate < '$end_date' and status != '已删除' " ) ?>
                </a>
            </td>

            <td>
                <a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=&select_startday=<?echo $start_date?>&select_endday=<?echo $end_date?>&sys_part=task" >
                    <u>
                        <?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and enddate > '$start_date' and enddate < '$end_date' and status != '已完成' and status != '已删除' ")?>
                    </u>
                </a>
            </td>

            <td>
                <a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=待审核&select_startday=<?echo $start_date?>&select_endday=<?echo $end_date?>&sys_part=task" >
                    <u>
                       <?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and status = '待审核' and enddate > '$start_date' and enddate < '$end_date' ")?>
                    </u>
                </a>
            </td>
            <td>
                <a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=待审核&sys_part=task" >
                    <u>
                       <?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and status = '待审核' ")?>
                    </u>
                </a>
            </td>


            <td><?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and completedate > enddate and status = '已完成'")?></td>
            <td><?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and completedate > enddate and (status != '已完成' or status != '已删除')"  )?></td>
            <td><?echo count_by_item($table_Prefix."task","principal = '$value[nid]' and is_del = '0' and status = '已完成' and completedate > '$start_date' and completedate < '$end_date' ")?></td>
            <td>
          
                <a target="_blank" href="detail-list.php?select_principal_id=<?echo $value['nid']?>&select_status=&select_startday=<?echo $start_date?>&select_endday=<?echo $end_date?>&sys_part=task" class="layui-btn-xs layui-btn">查看</a>

            </td>
        </tr>
        <?}?>
    </table>

</div>















<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>
